Controller

ABSTRACT

The controller includes a position commander and an error corrector. The position commander outputs a position command value for moving a moving mechanism. The error corrector includes a feedforward controller and a compensator calculator. The feedforward controller performs a feedforward control of the moving mechanism based on the position command value outputted from the position commander and includes a compensator. The compensator calculator calculates a value to be set as the compensator of the feedforward controller based on the position command value outputted from the position commander.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a controller.

2. Description of Related Art

A coordinate measuring machine or a machine tool has been known in which a moving mechanism has a plurality of moving axes for moving a probe for measurement, a tool or the like. Such a coordinate measuring machine or a machine tool includes a controller for controlling the moving mechanism based on a position command value.

When the controller controls the moving mechanism, an error between the position command value and a position of the moving mechanism (hereinafter referred to as a route error) may be caused by difference in response characteristics of the respective moving axes.

As a typical control system for reducing such a route error, a feedforward control system including a predetermined compensator has been known (for example, see Document 1: Fujino Yoshikazu, Kyura Nobuhiro “MOTION CONTROL—Practical Mechatronics” Sangyo-Tosho, 1996, Pages 135 to 140).

Typically, when the moving speed of the moving mechanism is increased, the response characteristics of the respective moving axes are changed depending on the moving speed.

However, in the control system disclosed in Document 1, since a value of the compensator is constant, the compensator cannot follow the change of the response characteristics of the respective moving axes while the moving mechanism moves at high speed. Thus, the route error cannot be sufficiently reduced.

SUMMARY OF THE INVENTION

An object of the invention is to provide a controller capable of sufficiently reducing a route error during high-speed movement.

A controller according to an aspect of the invention that controls a moving mechanism including a plurality of moving axes includes: a position commander that outputs a position command value for moving the moving mechanism; and an error corrector that corrects an error between the position command value and a position of the moving mechanism, in which the error corrector includes a feedforward controller that performs a feedforward control of the moving mechanism based on the position command value, and a compensator calculator that calculates a compensator of the feedforward controller based on the position command value.

Since the compensator calculator calculates the compensator based on the position command value according to the aspect of the invention, the compensator corresponding to the moving speed of the moving mechanism can be obtained. Also, since the feedforward controller performs the feedforward control using the compensator calculated by the compensator calculator, the route error can be sufficiently reduced even during the high-speed movement.

More specifically, when the position command value is outputted for moving the moving mechanism circularly at a constant angular velocity, for instance, such a route error that the movement of the moving mechanism describes an elliptical trajectory because of difference in gains of the response characteristics of the respective moving axes. At this time, a long axis and a short axis of the elliptical trajectory described by the moving mechanism substantially coincide with the respective directions of the moving axes.

According to the aspect of the invention, the compensator calculator can calculate the compensator corresponding to a radius, an angular velocity and a frequency of the circular motion based on the position command value. Thus, the route error can be corrected, thereby sufficiently reducing the route error even during the high-speed movement.

In the controller according to the aspect of the invention, the error corrector may include a phase difference correction-amount calculator that calculates a phase difference correction-amount for correcting a phase difference among the moving axes based on the position command value, and a phase difference corrector that corrects the phase difference among the moving axes based on the phase difference correction-amount.

According to such an arrangement, the phase difference correction-amount calculator calculates the phase difference correction-amount based on the position command value. Thus, the phase difference correction-amount corresponding to the moving speed of the moving mechanism can be obtained. Subsequently, the phase difference corrector corrects the phase difference among the moving axes based on the phase difference correction-amount calculated by the phase difference correction-amount calculator. Thus, the route error can be sufficiently reduced even during the high-speed movement.

More specifically, when the position command value is outputted for moving the moving mechanism circularly at a constant angular velocity, for instance, such a route error that the movement of the moving mechanism describes an elliptical trajectory is generated due to the difference in the phase of the response characteristics of the respective moving axes. At this time, a long axis and a short axis of the elliptical trajectory described by the moving mechanism extend in directions different from the directions of the moving axes.

According to the aspect of the invention, the phase difference correction-amount calculator calculates the compensator corresponding to the radius, angular velocity and frequency of the circular motion based on the position command value. Thus, the route error can be corrected, thereby sufficiently reducing the route error even during the high-speed movement.

In the controller according to the aspect of the invention, the phase difference corrector may correct the phase difference among the moving axes by performing a coordinate transformation of the position command value based on the phase difference correction-amount.

With such an arrangement, the same advantages can be attained as those of the above-described controller.

In the controller according to the aspect of the invention, the phase difference corrector may correct the phase difference among the moving axes by delaying the position command value based on the phase difference correction-amount.

With such an arrangement, the same advantages can be attained as those of the above-described controller.

The controller according to the aspect of the invention may further includes a feedback controller that includes a position controller for outputting to the moving mechanism a speed command value based on the error and performs a feedback control of the moving mechanism, in which a feedforward controller performs a feedforward control of the moving mechanism by performing a first order differentiation of the position command value, multiplying the position command value by the compensator, and then adding the position command value to the speed command value.

With such an arrangement, the same advantages can be attained as those of the above-described controller.

In the controller according to the aspect of the invention, the position commander may output the position command value for circularly moving the moving mechanism and the error corrector may correct the error based on at least one of a radius and a frequency of the circular motion.

The route error generated when the position command value for moving the moving mechanism circularly is outputted occurs depending on the radius and frequency of the circular motion.

Accordingly, the error corrector corrects the error based on at least one of the radius and frequency of the circular motion. Thus, the route error can be further sufficiently reduced during the high-speed movement.

In the controller according to the aspect of the invention, the error corrector may correct the error based on the position of the moving mechanism.

In the moving mechanism including the plurality of moving axes, the route error is changed depending on the position of the moving mechanism because of its structure.

Accordingly, the error corrector corrects the error based on the position of the moving mechanism. Thus, the route error can be further sufficiently reduced during the high-speed movement.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a controller and a moving mechanism according to a first exemplary embodiment of the invention.

FIG. 2A shows a route error when the moving mechanism according to the first exemplary embodiment is circularly moved at a high constant angular velocity.

FIG. 2B shows another route error when the moving mechanism according to the first exemplary embodiment is circularly moved at a high constant angular velocity.

FIG. 3 is a block diagram showing a controller and a moving mechanism according to a second exemplary embodiment of the invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENT(S) First Exemplary Embodiment

A first exemplary embodiment of the invention will be described below with reference to the attached drawings.

FIG. 1 is a block diagram showing a controller 1 and a moving mechanism 2 according to the first exemplary embodiment of the invention.

The controller 1 controls the moving mechanism 2. As shown in FIG. 1, the controller 1 includes a position commander 3, a feedback controller 4, and an error corrector 5.

The moving mechanism 2, which is controllable by the controller 1, includes three moving axes (hereinafter referred to as X, Y and Z axes) orthogonal to each other. The moving mechanism 2 is configured by a typical control system of multiple loops including a speed control loop, current control loop and the like. Incidentally, a transfer function of the moving mechanism 2 is denoted as G₀(s) in FIG. 1.

The position commander 3 outputs a position command value for moving the moving mechanism 2. In this exemplary embodiment, the position commander 3 outputs a position command value for circularly moving the moving mechanism 2.

The feedback controller 4 is for a feedback control of the position of the moving mechanism 2. The feedback controller 4 includes: an integrator 41 for integrating the speed of each moving axis of the moving mechanism 2 to output the position of the moving mechanism 2; and a position controller 42 for outputting to the moving mechanism 2 a speed command value based on an error between the position command value outputted from the position commander 3 through the error corrector 5 and the position of the moving mechanism 2 outputted from the integrator 41. Incidentally, in practice, the position of the moving mechanism 2 is detected by a position sensor or the like.

The error corrector 5 corrects the error between the position command value and the position of the moving mechanism 2. The error corrector 5 includes a feedforward controller 51, a compensator calculator 52, a phase difference correction-amount calculator 53, and a phase difference corrector 54.

The feedforward controller 51 is for a feedforward control of the moving mechanism 2 based on the position command value outputted from the position commander 3 through the phase difference corrector 54. The feedforward controller 51 includes a differentiator 511 for differentiating the position command value to output a speed command value and a compensator 512 to be multiplied with the speed command value outputted from the differentiator 511.

The speed command value multiplied by the compensator 512 and the speed command value outputted from the position controller 42 are added together to be outputted to the moving mechanism 2.

The compensator calculator 52 calculates a value to be set as the compensator 512 (hereinafter referred to as feedforward gain K_(FF)) based on the position command value outputted from the position commander 3. Specifically, the compensator calculator 52 calculates the feedforward gain K_(FF) by a function F1 of a radius R_(XYZ) and frequency f_(XYZ) of the circular motion of the moving mechanism 2 based on the position command value as represented by the following formula (1). Also, when the route error is changed depending on the position of the moving mechanism 2 because of its structure, the compensator calculator 52 calculates the feedforward gain K_(FF) by a function F2 of the radius R_(XYZ), the frequency f_(XYZ), and a position (X_(P), Y_(P), Z_(P)) of the moving mechanism 2 as represented by the following formula (2). Incidentally, the position of the moving mechanism 2 is detected by a position sensor or the like provided on the moving mechanism 2. K _(FF) =F1(f _(XYZ) ,R _(XYZ))   (1) K _(FF) =F2(f _(XYZ) ,R _(XYZ) ,X _(P) ,Y _(P) ,Z _(P))   (2)

The radius R_(XYZ) and frequency f_(XYZ) of the circular motion of the moving mechanism 2 are calculated based on the position command value (X_(R), Y_(R), Z_(R)) and the center position (X₀, Y₀, Z₀) of the circular motion as represented by the following formulae (3) and (4). Note that “s” in the formula (4) denotes the Laplace operator. R _(XYZ)=√{square root over ((X _(R) −X ₀)²+(Y _(R) −Y ₀)²+(Z _(R) −Z ₀)²)}{square root over ((X _(R) −X ₀)²+(Y _(R) −Y ₀)²+(Z _(R) −Z ₀)²)}{square root over ((X _(R) −X ₀)²+(Y _(R) −Y ₀)²+(Z _(R) −Z ₀)²)}  (3) f _(XYZ)=√{square root over ((X _(R) ·s)²+(Y _(R) ·s)²+(Z _(R) ·s)²)}{square root over ((X _(R) ·s)²+(Y _(R) ·s)²+(Z _(R) ·s)²)}{square root over ((X _(R) ·s)²+(Y _(R) ·s)²+(Z _(R) ·s)²)}/(2πR _(XYZ))   (4)

Next, a method of calculating the functions F1 and F2 in the formulae (1) and (2) will be described.

The function F1 is calculated based on an average value of the route error (hereinafter referred to as an average error AE) when the moving mechanism 2 is circularly moved at a constant angular velocity. The average error AE is obtained by averaging differences between time-series data of the position command value outputted from the position commander 3 and time-series data of the respective positions of the moving mechanism 2.

In this exemplary embodiment, the average error AE is obtained based on time-series data when the moving mechanism 2 is circularly moved on any two planes of an XY plane, an XZ plane and a YZ plane. Since the time-series data when the moving mechanism 2 is circularly moved on the two planes are used, the response characteristic of each moving axis of the X, Y and Z axes can be taken into consideration.

In addition, such conditions as the feedforward gain K_(FF), and the frequency f_(XYZ) and radius R_(XYZ) of the circular motion are respectively changed so as to calculate the average error AE under each condition. Subsequently, as represented by the following formula (5), the average error AE calculated under each condition is approximated by a function F3 of the feedforward gain K_(FF), and the frequency f_(XYZ) and radius R_(XYZ) of the circular motion. AE=F3(K _(FF) ,f _(XYZ) ,R _(XYZ))   (5)

Further, by setting the average error AE to 0 in the formula (5) to solve for the feedforward gain K_(FF), the function F1 can be obtained as represented by the following formulae (6) and (7). F3(K _(FF) ,f _(XYZ) ,R _(XYZ))=0   (6) K _(FF) =F1(f _(XYZ) ,R _(XYZ))   (7)

Similarly to the function F1, the function F2 is obtained based on the average error AE. Then, such conditions as the center position of the circular motion in addition to the feedforward gain K_(FF), and the frequency f_(XYZ) and radius R_(XYZ) of the circular motion are respectively changed so as to calculate the average error AE under each condition. Subsequently, as represented by the following formula (8), the average error AE calculated under each condition is approximated by a function F4 of the feedforward gain K_(FF), the frequency f_(XYZ) and radius R_(XYZ) of the circular motion, and the position of the moving mechanism 2. AE=F4(K _(FF) ,f _(XYZ) ,R _(XYZ) ,X _(P) ,Y _(P) ,Z _(P))   (8)

Further, by setting the average error AE to 0 in the formula (8) to solve for the feedforward gain K_(FF), the function F2 can be obtained as represented by the following formulae (9) and (10). F4(K _(FF) ,f _(XYZ) ,R _(XYZ) ,X _(P) ,Y _(P) ,Z _(P))=0   (9) K _(FF) =F2(f _(XYZ) ,R _(XYZ) ,X _(P) ,Y _(P) ,Z _(P))   (10)

The phase difference correction-amount calculator 53 calculates a phase difference correction-amount Cφ to correct a phase difference among the moving axes of the X, Y and Z axes based on the position command value outputted from the position commander 3. Specifically, as represented by the following formula (11), the phase difference correction-amount calculator 53 calculates a phase difference correction-amount Cφ_(XY) between the X and Y axes, a phase difference correction-amount Cφ_(XZ) between the X and Z axes and a phase difference correction-amount Cφ_(YZ) between the Y and Z axes by functions F5 to F7 of radii R_(XY), R_(XZ), R_(YZ) and frequencies f_(XY), f_(XZ), f_(YZ) of the circular motion of the moving mechanism 2 based on the position command value. Incidentally, the suffixes of the radii R and frequencies f denote radii and frequencies of the circular motion on the XY plane, XZ plane and YZ plane, respectively. Also, when the route error is changed depending on the position of the moving mechanism 2 because of its structure, the phase difference correction-amount calculator 53 calculates the phase difference correction-amounts Cφ_(XY), Cφ_(XZ) and Cφ_(YZ) by functions F8 to F10 of the radii R_(XY), R_(XZ) and R_(YZ), the frequencies f_(XY), f_(XZ) and f_(YZ), and the positions of the moving mechanism 12 as represented by the following formula (12).

$\begin{matrix} \left. \begin{matrix} {{C\;\phi_{XY}} = {F\; 5}} & \left( {f_{{XY},}R_{XY}} \right) \\ {{C\;\phi_{XZ}} = {F\; 6}} & \left( {f_{XZ},R_{XZ}} \right) \\ {{C\;\phi_{YZ}} = {F\; 7}} & \left( {f_{YZ},R_{YZ}} \right) \end{matrix} \right\} & (11) \\ \left. \begin{matrix} {{C\;\phi_{XY}} = {F\; 8}} & \left( {f_{XY},R_{XY},X_{P},Y_{P},Z_{P}} \right) \\ {{C\;\phi_{XZ}} = {F\; 9}} & \left( {f_{XZ},R_{XZ},X_{P},Y_{P},Z_{P}} \right) \\ {{C\;\phi_{YZ}} = {F\; 10}} & \left( {f_{YZ},R_{YZ},X_{P},Y_{P},Z_{P}} \right) \end{matrix} \right\} & (12) \end{matrix}$

Here, the radii R_(XY), R_(XZ) and R_(YZ) and the frequencies f_(XY), f_(XZ) and f_(YZ) of the circular motion of the moving mechanism 2 are calculated based on the position command value and the center position of the circular motion as represented by the following formulae (13) and (14). Note that, “s” in the formula (14) denotes the Laplace operator.

$\begin{matrix} \left. \begin{matrix} {R_{XY} = \sqrt{\left( {X_{R} - X_{0}} \right)^{2} + \left( {Y_{R} - Y_{0}} \right)^{2}}} \\ {R_{XZ} = \sqrt{\left( {X_{R} - X_{0}} \right)^{2} + \left( {Z_{R} - Z_{0}} \right)^{2}}} \\ {R_{YZ} = \sqrt{\left( {Y_{R} - Y_{0}} \right)^{2} + \left( {Z_{R} - Z_{0}} \right)^{2}}} \end{matrix} \right\} & (13) \\ \left. \begin{matrix} {f_{XY} = {\sqrt{\left( {X_{R} \cdot s} \right)^{2} + \left( {Y_{R} \cdot s} \right)^{2}}/\left( {2\pi\; R_{XY}} \right)}} \\ {f_{XZ} = {\sqrt{\left( {X_{R} \cdot s} \right)^{2} + \left( {Z_{R} \cdot s} \right)^{2}}/\left( {2\pi\; R_{XZ}} \right)}} \\ {f_{YZ} = {\sqrt{\left( {Y_{R} \cdot s} \right)^{2} + \left( {Z_{R} \cdot s} \right)^{2}}/\left( {2\pi\; R_{YZ}} \right)}} \end{matrix} \right\} & (14) \end{matrix}$

The phase difference correction-amount calculator 53 calculates any two of the phase difference correction-amounts Cφ_(XY), Cφ_(XZ) and Cφ_(YZ). This is because, for instance, the phase difference between the Y and Z axes can be corrected by correcting the phase difference between the X and Y axes and the phase difference between the X and Z axes based on the phase difference correction-amounts Cφ_(XY) and Cφ_(XZ).

The phase difference corrector 54 corrects the phase difference among the moving axes by a coordinate transformation of the position command value outputted from the position commander 3 based on the phase difference correction-amount Cφ calculated by the phase difference correction-amount calculator 53. Specifically, the phase difference corrector 54 corrects the phase difference among the moving axes as represented by the following formulae (15-1) to (15-3). When the phase difference correction-amounts Cφ_(XY) and Cφ_(XZ) are calculated by the phase difference correction-amount calculator 53, the phase difference of the moving axes is corrected by the formula (15-1). When the phase difference correction-amounts Cφ_(XY) and Cφ_(YZ) are calculated, the phase difference of the moving axes is corrected by the formula (15-2). When the phase difference correction-amounts Cφ_(XZ) and Cφ_(YZ) are calculated, the phase difference of the moving axes is corrected by the formula (15-3). Subsequently, the corrected position command value (CX_(R), CY_(R), CZ_(R)) is outputted to the position controller 42 and the differentiator 511.

$\begin{matrix} {\begin{pmatrix} {CX}_{R} \\ {CY}_{R} \\ {CZ}_{R} \end{pmatrix} = {\begin{pmatrix} 1 & {\sin\left( {{- C}\;\phi_{XY}} \right)} & {\sin\left( {{- C}\;\phi_{XZ}} \right)} \\ 0 & {\cos\left( {{- C}\;\phi_{XY}} \right)} & 0 \\ 0 & 0 & {\cos\left( {{- C}\;\phi_{XZ}} \right)} \end{pmatrix}\begin{pmatrix} X_{R} \\ Y_{R} \\ Z_{R} \end{pmatrix}}} & \left( {15 - 1} \right) \\ {\begin{pmatrix} {CX}_{R} \\ {CY}_{R} \\ {CZ}_{R} \end{pmatrix} = {\begin{pmatrix} {\cos\left( {X\;\phi_{XY}} \right)} & 0 & 0 \\ {\sin\left( {C\;\phi_{XY}} \right)} & 1 & {\sin\left( {{- C}\;\phi_{YZ}} \right)} \\ 0 & 0 & {\cos\left( {{- C}\;\phi_{YZ}} \right)} \end{pmatrix}\begin{pmatrix} X_{R} \\ Y_{R} \\ Z_{R} \end{pmatrix}}} & \left( {15 - 2} \right) \\ {\begin{pmatrix} {CX}_{R} \\ {CY}_{R} \\ {CZ}_{R} \end{pmatrix} = {\begin{pmatrix} {\cos\left( {C\;\phi_{XZ}} \right)} & 0 & 0 \\ 0 & {\cos\left( {C\;\phi_{YZ}} \right)} & 0 \\ {\sin\left( {C\;\phi_{XZ}} \right)} & {\sin\left( {C\;\phi_{YZ}} \right)} & 1 \end{pmatrix}\begin{pmatrix} X_{R} \\ Y_{R} \\ Z_{R} \end{pmatrix}}} & \left( {15 - 3} \right) \end{matrix}$

Next, a method of calculating the functions F5 to F10 in the formulae (11) and (12) will be described.

The functions F5 to F7 are obtained based on the phase difference, which is calculated based on the position of the moving mechanism 2, when the moving mechanism 2 is circularly moved at a constant angular velocity.

In this exemplary embodiment, the phase difference generated when the moving mechanism 2 is circularly moved on any two planes of the XY plane, XZ plane and YZ plane corresponding to the phase difference correction-amount Cφ calculated by the phase difference correction-amount calculator 53 is calculated.

In addition, such conditions as the frequencies f_(XY), f_(XZ) and f_(YZ) and the radii R_(XY), R_(XZ) and R_(YZ) of the circular motion are respectively changed so as to calculate the phase difference under each condition. The functions F5 to F7 are obtained by approximating the phase difference under each condition as functions of the frequencies f_(XY), f_(XZ) and f_(YZ) and the radii R_(XY), R_(XZ) and R_(YZ).

Similarly to the functions F5 to F7, the functions F8 to F10 are calculated based on the phase difference calculated based on the position of the moving mechanism 2 when the moving mechanism 2 is circularly moved at a constant angular velocity. In addition, such conditions as the center position of the circular motion in addition to the frequencies f_(XY), f_(XZ) and f_(YZ), and the radii R_(XY), R_(XZ) and R_(YZ) of the circular motion are respectively changed so as to calculate the phase difference under each condition. Then, the functions F8 to F10 are obtained by approximating the phase difference under each condition as functions of the frequencies f_(XY), f_(XZ) and f_(YZ) and radii R_(XY), R_(XZ) and R_(YZ) of the circular motion, and the positions of the moving mechanism 2.

FIGS. 2A and 2B show a route error when the moving mechanism 2 is circularly moved at a high constant angular velocity. FIG. 2A shows a route error when the moving mechanism 2 is controlled using a typical feedforward control system including a predetermined compensator, and FIG. 2B shows a route error when the moving mechanism 2 is controlled using the controller 1 of the invention.

In FIGS. 2A and 2B, a circle shown in a second outermost solid line is based on the position command value outputted from the position commander 3.

When the moving mechanism 2 is controlled using the typical feedforward control system including a predetermined compensator, the compensator cannot follow the change of the response characteristic of each moving axis during the movement of the moving mechanism 2 at a high velocity as shown in FIG. 2A. Thus, the route error cannot be sufficiently reduced. Also, due to difference in gains of the response characteristics of the respective moving axes or phase difference, such a route error that the movement of the moving mechanism 2 describes an elliptical trajectory.

On the contrary, when the moving mechanism 2 is controlled using the controller 1 of the invention, the compensator can follow the change of the response characteristic of each moving axis during the movement of the moving mechanism 2 at a high velocity as shown in FIG. 2B. Thus, the route error can be sufficiently reduced. In addition, such a route error that the movement of the moving mechanism 2 describes an elliptical trajectory is not generated.

According to the exemplary embodiment, the following advantages can be attained.

-   (1) Since the compensator calculator 52 calculates the feedforward     gain K_(FF) based on the position command value, the feedforward     gain K_(FF) corresponding to the moving speed of the moving     mechanism 2 can be obtained. Subsequently, the feedforward     controller 51 performs a feedforward control using the feedforward     gain K_(FF) calculated by the compensator calculator 52, whereby the     route error can be sufficiently reduced even during the high-speed     movement. -   (2) Since the phase difference correction-amount calculator 53     calculates the phase difference correction-amount Cφ based on the     position command value, the phase difference correction-amount Cφ     corresponding to the moving speed of the moving mechanism 2 can be     obtained. Subsequently, the phase difference corrector 54 corrects     the phase difference among the moving axes based on the phase     difference correction-amount Cφ calculated by the phase difference     correction-amount calculator 53. Thus, the route error can be     sufficiently reduced even during the high-speed movement. -   (3) Since the error corrector 5 corrects the error based on the     radius R and frequency f of the circular motion, the route error can     be further sufficiently reduced even during the high-speed movement. -   (4) Since the error corrector 5 corrects the error based on the     position of the moving mechanism 2, the route error can be further     sufficiently reduced even during the high-speed movement.

Second Exemplary Embodiment

A second exemplary embodiment of the invention will be described below with reference to the attached drawings.

In the following description, components which correspond to those of the first exemplary embodiment will be denoted by the same reference numerals, description of which will be omitted.

FIG. 3 is a block diagram showing a controller 1A and the moving mechanism 2 according to the second exemplary embodiment of the invention.

In the first exemplary embodiment, the controller 1 includes the phase difference corrector 54 to correct the phase difference among the moving axes by a coordinate transformation of the position command value outputted from the position commander 3 based on the phase difference correction-amount Cφ calculated by the phase difference correction-amount calculator 53.

On the other hand, the controller 1A includes a phase difference corrector 54A to correct a phase difference among the moving axes by delaying a position command value outputted from the position commander 3 based on the phase difference correction-amount Cφ calculated by the phase difference correction-amount calculator 53 according to the second exemplary embodiment.

The phase difference corrector 54A initially calculates a time-delay correction-amount ΔT based on the phase difference correction-amount Cφ calculated by the phase difference correction-amount calculator 53 as represented by the following formula (16).

$\begin{matrix} {{\Delta\; T} = \frac{C\;\phi}{2\pi\; f}} & (16) \end{matrix}$

Next, the phase difference corrector 54A delays the position command value outputted from the position commander 3 based on the time-delay correction-amount ΔT given by the formula (16). Subsequently, the corrected position command value is outputted to the position controller 42 and the differentiator 511. More specifically, when a time-delay correction-amount ΔT_(XY) between Y and X axes is calculated to delay the position command value regarding the X axis, the phase difference corrector 54A calculates a new position command value NX_(R) which is delayed by the time-delay correction-amount ΔT_(XY) behind a present position command value X_(R) by linear interpolation as represented by the formula (17), and outputs the calculated position command value NX_(R) as the corrected position command value.

$\begin{matrix} {{NX}_{R} = {{X_{R}\left( A_{\Delta\; T} \right)} + {\frac{{X_{R}\left( {A_{\Delta\; T} + 1} \right)} - {X_{R}\left( A_{\Delta\; T} \right)}}{T_{S}} \cdot B_{\Delta\; T}}}} & (17) \end{matrix}$

Note that, “A_(ΔT)” denotes a quotient of ΔT_(XY)/T_(S) and “B_(ΔT)” denotes a residue of ΔT_(XY)/T_(S). “T_(S)” denotes a sampling interval of the position command value.

In this exemplary embodiment, the same advantages can be attained as those of the first exemplary embodiment.

Modification of Exemplary Embodiment(s)

The invention is not limited to the above-described exemplary embodiments, but includes any modifications, improvements and the like as long as an object of the invention can be achieved.

Though the moving mechanism 2 includes three moving axes orthogonal to each other according to the exemplary embodiments, the moving mechanism may include two or four or more moving axes. In addition, the moving axes may not be orthogonal to each other. In other words, it is only required that the moving mechanism includes a plurality of moving axes.

Though the position commander 3 outputs the position command value for moving the moving mechanism 2 circularly at a constant angular velocity according to the exemplary embodiments, the angular velocity may not be constant. Also, the position commander may output a position command value for curved motion. At this time, a curvature radius of the curved motion is used in place of the radius R of the circular motion. The frequency is calculated based on the curvature radius and the moving speed of the moving mechanism. In short, it is only required that the position commander outputs a position command value for moving the moving mechanism 2.

Though the controller 1, 1A includes the phase difference correction-amount calculator 53 and the phase difference corrector 54, 54A according to the exemplary embodiments, the controller may not include the phase difference correction-amount calculator or the phase difference corrector.

After the first order differentiation of the position command value outputted from the position commander 3, the feedforward controller 51 adds the position command value multiplied by the feedforward gain K_(FF) to the speed command value according to the exemplary embodiments. However, the feedforward controller may perform the first order differentiation after multiplying the position command value by the compensator.

Though the error corrector 5 corrects the error based on the radius R and frequency f of the circular motion according to the exemplary embodiments, the error may be corrected based on, for instance, only the radius. In other words, it is only required that the error is corrected based on at least one of the radius and frequency of the circular motion.

The entire disclosure of Japanese Patent Application No. 2008-148986, filed Jun. 6, 2008, is expressly incorporated by reference herein. 

What is claimed is:
 1. A controller that controls a moving mechanism comprising a plurality of moving axes, the controller comprising: a position commander that outputs a position command value for moving the moving mechanism; and an error corrector that corrects an error between the position command value and a position of the moving mechanism, wherein the error corrector comprises: a feedforward controller that performs a feedforward control of the moving mechanism based on the position command value; a compensator calculator that calculates a compensator of the feedforward controller based on the position command value; a phase difference correction-amount calculator that calculates a phase difference correction-amount for correcting a phase difference among the moving axes based on the position command value; and a phase difference corrector that corrects the phase difference among the moving axes based on the phase difference correction-amount.
 2. The controller according to claim 1, wherein the phase difference corrector corrects the phase difference among the moving axes by performing a coordinate transformation of the position command value based on the phase difference correction-amount.
 3. The controller according to claim 1, wherein the phase difference corrector corrects the phase difference among the moving axes by delaying the position command value based on the phase difference correction-amount.
 4. A controller that controls a moving mechanism comprising a plurality of moving axes, the controller comprising: a position commander that outputs a position command value for moving the moving mechanism; an error corrector that corrects an error between the position command value and a position of the moving mechanism, the error corrector comprising: a feedforward controller that performs a feedforward control of the moving mechanism based on the position command value; and a compensator calculator that calculates a compensator of the feedforward controller based on the position command value; and a feedback controller that includes a position controller for outputting to the moving mechanism a speed command value based on the error and performs a feedback control of the moving mechanism, wherein the feedforward controller performs a feedforward control of the moving mechanism by performing a first order differentiation of the position command value, multiplying the position command value by the compensator, and adding the position command value to the speed command value.
 5. A controller that controls a moving mechanism comprising a plurality of moving axes, the controller comprising: a position commander that outputs a position command value for moving the moving mechanism; and an error corrector that corrects an error between the position command value and a position of the moving mechanism, wherein the error corrector comprises: a feedforward controller that performs a feedforward control of the moving mechanism based on the position command value; a differentiator for differentiating the position command value to output a speed command value; and a compensator calculator that calculates a compensator to be multiplied with the speed command value based on the position command value.
 6. The controller according to claim 5 wherein the position commander outputs the position command value for circularly moving the moving mechanism, and the error corrector corrects the error based on at least one of a radius and a frequency of the circular motion.
 7. The controller according to claim 5, wherein the error corrector corrects the error based on the position of the moving mechanism. 